<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>flex对齐</title>
    <style>
        #container{
            height: 600px;
            background: #000;
            display: flex;
            flex-wrap: wrap;


            /* 水平居中对齐  
            flex-start 左对齐 
            flex-end 右对齐  
            space-around 间隔为边距的两倍
            space-evenly 均匀排列
            space-between 间隔均分*/
            /* justify-content: stretch; */


            /* 竖直方向居中 需要设置高度
            flex-start 
            flex-end 
            baseline
            stretch
            center
            */
            align-items: flex-start;


            /* 水平 垂直的结合
            spac-around
            space-between 
            flex-start
            flex-end 
            stretch
            center */
            /* align-content: spac-around; */
        }
        .item{
            background: #369;
            border: 1px solid #ccc;
            padding: 1rem;
            text-align: center;
            margin: 0.75rem;
            /* 相当于宽度 */
            flex-basis: 100px;
        }
        .item-2{
            /* 单个位置 
            auto
            flex-start 
            flex-end 
            baseline
            stretch
            center
            */
            align-self: flex-end;
            order: 3;
        }
        .item-1{
            order: 2;
        }
        .item-3{
            order: 1;
        }
    </style>
</head>
<body>
    <div id="container">
        <div class="item item-1"><h1>item1</h1></div>
        <div class="item item-2" ><h1>item2</h1></div>
        <div class="item item-3"><h1>item3</h1></div>
    </div>

</body>
</html>